package com.woniu.user.service.impl;

import com.woniu.common.entity.*;
import com.woniu.user.mapper.ApplyMapper;
import com.woniu.user.service.ApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApplyServiceImpl implements ApplyService {
    @Autowired
    ApplyMapper applyMapper;

    //犬只审核---申请界面查询
    @Override
    public List<ApplyForTable> selectApplies() {
        List<ApplyForTable> list=applyMapper.selectApplies();
        return list;
    }

    @Override
    public ApplyForTable selectDate(String icd) {
        ApplyForTable applyForTable=applyMapper.selectDate(icd);
        return applyForTable;
    }

    @Override
    public void selectApply(String icd, int a,int b,String reviewer) {
        applyMapper.selectApply(icd, a,b,reviewer);
    }

    @Override
    public void selectApply2(String icd, int i, String reason,String reviewer) {
        applyMapper.selectApply2(icd, i,reason,reviewer);
    }

    @Override
    public void selectApply3(String icd, int i, int j, String reason,String reviewer) {
        applyMapper.selectApply3(icd, i,j,reason,reviewer);
    }

    @Override
    public void insertDog(Dog dog) {
        applyMapper.insertDog(dog);
    }

    @Override
    public void updateDognum(String etcnum, String url, String dname, int uid) {
        applyMapper.updateDognum(etcnum, url, dname, uid);
    }


    @Override
    public List<Dog> selectDog() {
        List<Dog> list=applyMapper.selectDog();
        return list;
    }

    @Override
    public void insertMessage(Message message) {
        applyMapper.insertMessage(message);
    }

    @Override
    public List<Message> selectMessage(int uid) {
        return applyMapper.selectMessage(uid);
    }

    @Override
    public User selectUser(String account) {
        return applyMapper.selectUser(account);
    }

    @Override
    public void updateStatus(int status, int id) {
        applyMapper.updateStatus(status, id);
    }

    @Override
    public List<Complain> selectComplainMessage() {
        return applyMapper.selectComplainMessage();
    }

    @Override
    public void updateComplainMessage(int id, int status) {
        applyMapper.updaeComplainMessage(id, status);
    }
}
